#include "delay.h"

// 40.0MHz
void delay_ms(unsigned int ms) {
    unsigned int i;
    do {
        i = 330;
        while (--i);

    } while(--ms);
}

void delay_10us(void)	//@40MHz
{
  unsigned char i;
  
  i = 14;
  while (--i);
}

void delay_1ms(void)	//@40MHz
{
  unsigned char i, j;
  
  i = 39;
  j = 230;
  do {
    while (--j);
  } while (--i);
}
